using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TraceNetworkTools
{
    /// <summary>
    /// <para>Set Network Attribute</para>
    /// <para>Assigns a network attribute to a feature class to be used during trace operations.</para>
    /// <para>将网络属性分配给要在追踪操作期间使用的要素类。</para>
    /// </summary>    
    [DisplayName("Set Network Attribute")]
    public class SetNetworkAttribute : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetNetworkAttribute()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_trace_network">
        /// <para>Input Trace Network</para>
        /// <para>The trace network that contains the network attribute to set.</para>
        /// <para>包含要设置的网络属性的追踪网络。</para>
        /// </param>
        /// <param name="_network_attribute">
        /// <para>Network Attribute</para>
        /// <para>The network attribute to be assigned to the feature class field.</para>
        /// <para>要分配给要素类字段的网络属性。</para>
        /// </param>
        /// <param name="_featureclass">
        /// <para>Feature Class</para>
        /// <para>The input feature class that contains the field that will be used to set the network attribute.</para>
        /// <para>包含将用于设置网络属性的字段的输入要素类。</para>
        /// </param>
        /// <param name="_field">
        /// <para>Field</para>
        /// <para>An existing field that will be assigned the network attribute. The field data type must match the data type of the network attribute. For example, if the network attribute is a short integer type, the field must also be a short integer type. Network attributes that do not support null values can only be assigned to fields that do not allow null values.</para>
        /// <para>将分配网络属性的现有字段。字段数据类型必须与网络属性的数据类型匹配。例如，如果网络属性是短整数类型，则该字段也必须是短整数类型。不支持 null 值的网络属性只能分配给不允许 null 值的字段。</para>
        /// </param>
        public SetNetworkAttribute(object _in_trace_network, object _network_attribute, object _featureclass, object _field)
        {
            this._in_trace_network = _in_trace_network;
            this._network_attribute = _network_attribute;
            this._featureclass = _featureclass;
            this._field = _field;
        }
        public override string ToolboxName => "Trace Network Tools";

        public override string ToolName => "Set Network Attribute";

        public override string CallName => "tn.SetNetworkAttribute";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_trace_network, _network_attribute, _featureclass, _field, _out_trace_network];

        /// <summary>
        /// <para>Input Trace Network</para>
        /// <para>The trace network that contains the network attribute to set.</para>
        /// <para>包含要设置的网络属性的追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Trace Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_trace_network { get; set; }


        /// <summary>
        /// <para>Network Attribute</para>
        /// <para>The network attribute to be assigned to the feature class field.</para>
        /// <para>要分配给要素类字段的网络属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_attribute { get; set; }


        /// <summary>
        /// <para>Feature Class</para>
        /// <para>The input feature class that contains the field that will be used to set the network attribute.</para>
        /// <para>包含将用于设置网络属性的字段的输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _featureclass { get; set; }


        /// <summary>
        /// <para>Field</para>
        /// <para>An existing field that will be assigned the network attribute. The field data type must match the data type of the network attribute. For example, if the network attribute is a short integer type, the field must also be a short integer type. Network attributes that do not support null values can only be assigned to fields that do not allow null values.</para>
        /// <para>将分配网络属性的现有字段。字段数据类型必须与网络属性的数据类型匹配。例如，如果网络属性是短整数类型，则该字段也必须是短整数类型。不支持 null 值的网络属性只能分配给不允许 null 值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field { get; set; }


        /// <summary>
        /// <para>Updated Trace Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Trace Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_trace_network { get; set; }


        public SetNetworkAttribute SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}